package com.lwx.sys.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 系统权限表
 * @author lwx
 * @since 2020-04-04
 */
@Data
@Entity
@EqualsAndHashCode()
@Accessors(chain = true)
@Table(name = "sys_permission")
@TableName("sys_permission")
public class Permission implements Serializable {

    private static final long serialVersionUID=1L;
    @Id
    @TableId(value = "id", type = IdType.AUTO)
    @Column(name = "ID")
    private Integer id;

    @Column(name = "PID")
    private Integer pid;

    /**
     * 权限类型[menu/permission]
     */
    @Column(name = "TYPE")
    private String type;

    @Column(name = "TITLE")
    private String title;

    /**
     * 权限编码[只有type= permission才有  user:view]
     */
    @Column(name = "PERCODE")
    private String percode;

    @Column(name = "ICON")
    private String icon;

    @Column(name = "HREF")
    private String href;

    @Column(name = "TARGET")
    private String target;

    /**
     * 是否展开
     */
    @Column(name = "OPEN")
    private Integer open;

    @Column(name = "ORDERNUM")
    private Integer ordernum;

    /**
     * 状态【0不可用1可用】
     */
    @Column(name = "AVAILABLE")
    private Integer available;


}
